<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="cms" uri="http://cms.gxsoft.com/tags-cms"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加新闻</title>
<link href="<%=request.getContextPath()%>/css/reset.css" rel="stylesheet" type="text/css"/>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css"/>
<script language="javascript" src="<%=request.getContextPath()%>/js/meizzDate.js"></script>
<script type="text/javascript">

	function selectEmployer(){
		var arr = showModalDialog("<%=request.getContextPath()%>/EmployerInfo.do?method=find", "", "dialogWidth:550pt;dialogHeight:400pt;help:0;status:0");
		if(arr != null){
			var id = arr[0][0];
			var name = arr[0][1];
			document.form1.petitionInfoReportedUnit.value = id;
			document.form1.unit.value = name;
		}
	}
		
	function check(){
		var frm = document.form1;
		if(frm.petitionInfoRegister.value == ""){
			alert("请输入举报登记号！");
			frm.petitionInfoRegister.focus();
			return false;
		}
		if(frm.petitionInfoTime.value == ""){
			alert("请选择举报时间！");
			frm.petitionInfoTime.focus();
			return false;
		}
		if(frm.petitionInfoType.value == ""){
			alert("请选择举报类型！");
			return false;
		}
		if(frm.petitionInfoReportedUnit.value == ""){
			alert("请选择被举报单位！");
			frm.petitionInfoTitle.focus();
			return false;
		}
		if(frm.petitionInfoTitle.value == ""){
			alert("请输入标题！");
			frm.petitionInfoTitle.focus();
			return false;
		}
		if(frm.petitionInfoDealResult.value == ""){
			alert("处理结果不能为空！");
			frm.petitionInfoDealResult.focus();
			return false;
		}
	}
</script>
</head>

<body>
<form action="<%=request.getContextPath()%>/PetitionInfo.do?method=add" name="form1" method="post" onsubmit="return check()">
<table width="100%">
  <tr>
    <td width="20%" align="right" class="bg_blue"><font color="red">*</font>&nbsp;&nbsp;举报登记号：</td>
    <td width="30%"><input name="petitionInfoRegister" value="" class="input" id="lxdh" size="30" maxlength="32" /></td>
    <td width="20%" align="right" class="bg_blue"><font color="red">*</font>&nbsp;&nbsp;举报时间：</td>
    <td width="30%"><input name="petitionInfoTime" onclick="SelectDate(this,'yyyy-MM-dd')" readonly value="" type="text" class="input" id="lxdh" size="30" maxlength="40" /></td>
  </tr>
  <tr>
    <td align="right" class="bg_blue">举报人姓名：</td>
    <td><input name="petitionInfoPersionName" value="" class="input" id="lxdh" size="30" maxlength="20" /></td>
    <td align="right" class="bg_blue"><font color="red">*</font>&nbsp;&nbsp;类型：</td>
    <td>
        <cms:selectAll dataType="006" name="petitionInfoType" firstTitle="请选择.."></cms:selectAll>
  </tr>
  <tr>

    <td align="right" class="bg_blue">联系电话：</td>
    <td><input name="petitionInfoTel" value="" class="input" id="lxdh" size="30" maxlength="20" /></td>
    <td align="right" class="bg_blue">联系地址：</td>
    <td><input name="petitionInfoAddress" value="" class="input" id="lxdh" size="30" maxlength="50" /></td>
  </tr>
  <tr>
    <td align="right" class="bg_blue">电子邮件：</td>
    <td><input name="petitionInfoEmail" value=""  class="input" id="lxdh" size="30" maxlength="30" /></td>
        <td align="right" class="bg_blue"><font color="red">*</font>&nbsp;&nbsp;被举报单位：</td>
    <td width="75%" align="left" ><input type="hidden" name="petitionInfoReportedUnit"><input type="text" name="unit" size="30" readonly onClick="javascript:selectEmployer()"> <input class="buttonadd" type="button" value="选择" onClick="javascript:selectEmployer()">&nbsp;</td>
  </tr>
  <tr>
    <td align="right" class="bg_blue"><font color="red">*</font>&nbsp;&nbsp;标题：</td>
    <td colspan="3"><input name="petitionInfoTitle" value="" class="input" id="bt" size="60" maxlength="100" /></td>
  </tr>
  <tr>
    <td align="right" class="bg_blue">内容：</td>
    <td colspan="3"  align="left" valign="top"><textarea name="petitionInfoContent" cols="70" rows="10" id="nr"></textarea>
    </td>
  </tr>
  <tr>
    <td align="right" class="bg_blue"><font color="red">*</font>&nbsp;&nbsp;处理结果：</td>
    <td colspan="3"  align="left" valign="top"><textarea name="petitionInfoDealResult" cols="70" rows="10" id="nr"></textarea>
    </td>
  </tr>
  <tr>
    <td colspan="4" align="center" class="nohover">
    <input type="submit" class="buttonsubmit" onClick="" value="提交"/>&nbsp;
     <input type="reset" class="buttonreset" value="重置"/>
    <input type="button" class="buttonreturn" onClick="history.back(-1);" value="返回"/></td>
  </tr>
</table>
</form>
</body>
</html>
